<?
require("config.php");

$show_backnav = "product_menu";
$location_status .= "| Delete";

$menuname = array(
	"Info",
	"Pictures",
	"Color",
	"Size",
	"Specification",
	"Features",
	"Accessories",
	"Packaging",
);

$menutarget = array(
	"delete",
	"delete_pictures",
	"delete_color",
	"delete_size",
	"delete_specification",
	"delete_features",
	"delete_accessories",
	"delete_packaging",
);

$menutype = 2;

if (NULL!=$action){

   $Query = "delete from $table where id=$id Limit 1";

   myQuery($Query);


   header("location:" . $rela_path . "share/msg.php?v=3");

   exit();

}


if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
}

$Query = "select 
	code,
	name,
	description,
	unit,
	brand,
	type,
	category,
	fabric,
	price_euro,
	price_gbp,
	price_hkd,
	price_usd,
	remark 
from pro_basic where id=$id Limit 1";

$r = myQuery($Query);

$Code=$r[0][0];
$Name=$r[0][1];
$Description=$r[0][2];
$Unit=$r[0][3];
$Brand=$r[0][4];
$Type=$r[0][5];
$Category=$r[0][6];
$Fabric=$r[0][7];
$Price_euro=$r[0][8];
$Price_gpb=$r[0][9];
$Price_hkd=$r[0][10];
$Price_usd=$r[0][11];
$Remark =$r[0][12];

/*
$Query = "select code, name from pro_brand";
$brands = myQuery($Query);

$Query = "select code, name from pro_type";
$types = myQuery($Query);


$Query = "select code, name from pro_category";
$categorys = myQuery($Query);
*/


require($rela_path . "inc/header.php");

?>

<!--Content Start-->
<form action="" method="post" enctype="multipart/form-data" name="form1">  
<!--hidden filed-->
<input name="id" type="hidden" value="<?print($id)?>">
<input name="action" type="hidden" value="add">

  <table width="95%" border="0" align="center">
                      <tr> 
                        
      <td>&nbsp; </td>
                      </tr>
                      <tr> 
                        
      <td><strong>Are you sure to delete this product ?</strong> <input type="Submit" class="button" name="Button" value="   Yes   "> 
        <input type="button" class="button" name="Submit2" value="   No   " onClick="Redirect('product_menu.php',1);"> 
        <br>
        <br>
        <table border="0">
          <tr> 
            <td class="tdheader">Code :</td>
            <td><?print($Code)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Name :</td>
            <td><?print($Name)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Description :</td>
            <td><?print($Description)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Unit :</td>
            <td><?print($Unit)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Brand :</td>
            <td><?print($Brand)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Type :</td>
            <td><?print($Type)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Category :</td>
            <td><?print($Category)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Fabric :</td>
            <td><?print($Fabric)?></td>
          </tr>
          <tr> 
            <td valign=top class="tdheader">Price : </td>
            <td>

			<TABLE>
			<TR>
				<TD>EURO</TD>
				<TD align=right><?print($Price_euro)?></TD>
			</TR>
			<TR>
				<TD>GPB</TD>
				<TD align=right><?print($Price_gpb)?></TD>
			</TR>
			<TR>
				<TD>HKD</TD>
				<TD align=right><?print($Price_hkd)?></TD>
			</TR>
			<TR>
				<TD>USD</TD>
				<TD align=right><?print($Price_usd)?></TD>
			</TR>
			</TABLE></td>
          </tr>
          <tr> 
            <td class="tdheader">Remarks :</td>
            <td><?print($Remark)?></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
        <p>&nbsp;</p>
        <p>&nbsp;</p></td>
                      </tr>
                    </table>
</form>
            <!--Content End-->
            <?
require($rela_path . "inc/footer.php");
?>
        